<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>权限列表--layphp后台管理模板</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="format-detection" content="telephone=no">
        <link rel="icon" href="/favicon.ico">
        <link rel="stylesheet" href="__PUBLIC__/static/layui/css/layui.css" media="all" />
        <link rel="stylesheet" href="__PUBLIC__/Admin/treegrid/css/jquery.treegrid.css" media="all" />
        <script type="text/javascript" src="__PUBLIC__/static/layui/layui.js"></script>
        <script type="text/javascript" src="__PUBLIC__/Admin/js/ruleList.js"></script>
        <script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.min.js"></script>
        <script type="text/javascript" src="__PUBLIC__/Admin/treegrid/js/jquery.treegrid.js"></script>

    </head>
    <body class="childrenBody">
        <blockquote class="layui-elem-quote">
            <div class="layui-inline">
                <a class="layui-btn layui-btn-normal ruleAdd_btn">添加权限</a>
            </div>
        </blockquote>
        <div class="layui-form news_list" lay-filter="nav">
            <table class="layui-table tree" lay-even>
                <colgroup>
                    <col width="100px">
                    <col width="18%">
                    <col>
                    <col width="20%">
                </colgroup>
                <thead>
                <tr>
                    <th >ID</th>
                    <th>权限名称</th>
                    <th>应用路径</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody class="news_content">
                <volist name="list" id="vo">
                    <tr  class='treegrid-<{$vo.id}> <if condition="$vo.pid neq 0" > treegrid-parent-<{$vo.pid}></if> ' >
                        <td style="text-align:left;"><{$vo['id']}></td>
                        <td>
                            <if condition="$vo['_level'] eq 1">
                                <i class="layui-icon" style="font-size: 6px; color:#fa8b27">&#xe617;</i><{$vo['_name']}>
                                <else />
                                <{$vo['_name']}>
                            </if>
                        </td>
                        <td><{$vo['name']}></td>
                        <td>
                            <if condition="($vo['_level'] eq 1) or($vo['_level'] eq 2) ">
                                <a class="layui-btn layui-btn-mini ruleAdd_btn" data-id="<{$vo['id']}>"><i class="layui-icon">&#xe654;</i>添加子权限</a>
                            </if>
                            <a class="layui-btn layui-btn-mini ruleEdit_btn" data-id="<{$vo['id']}>"><i class="layui-icon">&#xe642;</i>编辑</a>
                            <a class="layui-btn layui-btn-danger layui-btn-mini ruleDel_btn" data-id="<{$vo['id']}>"><i class="layui-icon">&#xe640;</i> 删除</a>
                        </td>
                    </tr>
                </volist>
                </tbody>
                <tfoot>
                <tr>
                    <th >ID</th>
                    <th>权限名称</th>
                    <th>应用路径</th>
                    <th>操作</th>
                </tr>
                </tfoot>
            </table>
        </div>
        <blockquote class="layui-elem-quote">
            <div class="layui-inline">
                <a class="layui-btn layui-btn-normal ruleAdd_btn">添加权限</a>
            </div>
        </blockquote>
        <script type="text/javascript">
            // 树形菜单折叠
            $('.tree').treegrid({initialState: 'collapsed'});
        </script>
    </body>
</html>